console.log('1')
setTimeout(()=>{
    console.log('2')
    new Promise((resolve)=>{
        console.log('3')
        resolve()
    }).then(()=>{
        console.log('4')
    })
})
new Promise((resolve)=>{
    console.log('5')
    resolve()
}).then(()=>{
    console.log('6')
})
setTimeout(()=>{
    console.log('7')
    new Promise((resolve)=>{
        console.log('8')
        resolve()
    }).then(()=>{
        console.log('9')
    })
})
//执行结果：156234789
//对于异步任务，优先执行微任务，然后执行宏任务
